/**

 **/
package AMOA.cmix.ngako.tchat;

import java.awt.event.*;

import javax.swing.*;

@SuppressWarnings("serial")
public class AppletNouvelles extends JApplet {
	private Timer timer;
	public void init(){
		final JLabel texte= new JLabel(getParameter("texte"));
		texte.setLocation(0,getHeight());
		texte.setSize(texte.getPreferredSize());
		getContentPane().setLayout(null);
		getContentPane().add(texte);
		ActionListener timerListener = new ActionListener(){
			public void actionPerformed(ActionEvent ev) {
				int y = texte.getY();
				if(y <= texte.getHeight())
					y = getHeight();
				else
					y--;
				texte.setLocation(texte.getX(), y);
			
				
			}
			
		};
		this.timer = new Timer(50,timerListener);
	}
	public void start (){
		this.timer.start();
	}
	public void stop(){
		this.timer.stop();
	}
	
}
